import json
import math

"""
n = 0

def cut_value():
    with open('../data/ciphertext_47.json', 'r') as f2:
        type_json = json.load(f2)  # 读取时对文件进行反序列化
        #print("反序列化后的内容：", type_json, "类型：", type(type_json))  # <class 'str'>
    org_str = type_json
    str_len = len(org_str)
    length = 32*1024*1024
    global n
    n = math.ceil(str_len / length)
    i = 0
    all_str_list = []
    while n > 0:
       split_str = org_str[i * length: (i + 1) * length]
       all_str_list.append(split_str)
       i += 1
       n -= 1


    return all_str_list

result_list = cut_value()
print(len(result_list))
print(result_list[0])
"""
"""
def cut_value():
    with open('../data/ciphertext_47.json', 'r') as f2:
        type_json = json.load(f2)  # 读取时对文件进行反序列化
        #print("反序列化后的内容：", type_json, "类型：", type(type_json))  # <class 'str'>
    org_str = type_json
    str_len = len(org_str)
    length = 32*1024*1024
    global n
    n = math.ceil(str_len / length)
    i = 0
    all_str_list = []
    while n > 0:
       split_str = org_str[i * length: (i + 1) * length]
       all_str_list.append(split_str)
       i += 1
       n -= 1
    return all_str_list


with open('../data/ciphertext_47.json', 'r') as f2:
    res = json.load(f2)  # 读取时对文件进行反序列化
with open('../data/temp.json', 'r') as f1:
    transferData = json.load(f1)  # 读取时对文件进行反序列化


res = cut_value()
print(transferData == res[9])
"""
with open('../data/ciphertext_47.json', 'r') as f2:
    res = json.load(f2)  # 读取时对文件进行反序列化
with open('../data/temp.json', 'r') as f1:
    temp = json.load(f1)  # 读取时对文件进行反序列化



print(temp == res)
